package DataManage;

import Tools.DatabaseConn;

import java.io.UnsupportedEncodingException;
import java.sql.SQLException;

public class AddDatabase {
    public void adddatabase(String interfaceName,String path, String request,String actualResult,String responseTime,String result ) throws SQLException, ClassNotFoundException, UnsupportedEncodingException {
        DatabaseConn add = new DatabaseConn();
        switch(interfaceName){
            case "注册/手机注册接口1500":
                add.add(interfaceName, path, "Post", request, "[code: 10002]", actualResult, responseTime, result);
                break;

            case "注册/手机注册接口1326":
                add.add(interfaceName, path, "Post", request, "[code: 10003]", actualResult, responseTime, result);
                break;

            case "好友申请/B同意所有申请":
                add.add(interfaceName, path, "Post", request, "[code: 10257]", actualResult, responseTime, result);
                break;

            case "注册/再次发送邮件激活链接":
                add.add(interfaceName, path, "Get", request, "[code: 200]", actualResult, responseTime, result);
                break;

            default:
                add.add(interfaceName, path, "Post", request, "[code: 200]", actualResult, responseTime, result);
                break;
        }
        /*if (interfaceName.equals("注册/手机注册接口1500")) {
            DatabaseConn add = new DatabaseConn();
            add.add(interfaceName, path, "Post", request, "[code: 10002]", actualResult, responseTime, result);
        }
        else if (interfaceName.equals("注册/手机注册接口1326")) {
            DatabaseConn add = new DatabaseConn();
            add.add(interfaceName, path, "Post", request, "[code: 10003]", actualResult, responseTime, result);
        }

        else if (interfaceName.equals("好友申请/B同意所有申请")) {
            DatabaseConn add = new DatabaseConn();
            add.add(interfaceName, path, "Post", request, "[code: 10257]", actualResult, responseTime, result);
        }

        else if (interfaceName.equals("注册/再次发送邮件激活链接")) {
            DatabaseConn add = new DatabaseConn();
            add.add(interfaceName, path, "Get", request, "[code: 200]", actualResult, responseTime, result);
        }
        else
        {
            DatabaseConn add = new DatabaseConn();
            add.add(interfaceName, path, "Post", request, "[code: 200]", actualResult, responseTime, result);
        }*/


    }
}
